package tv.acgn.advertisement.search.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import tv.acgn.advertisement.publish.api.vo.adplan.AdPlanRequestVO;
import tv.acgn.advertisement.servicebase.exception.AbstractAdSysBusinessException;
import tv.acgn.advertisement.servicebase.vo.CommonResponse;

/**
 * @author : junG
 * @program : advertisement-ad-search
 * @description : 客户端调用类 远程调用 ad-publish 模块的服务
 * @date : 2019-06-02 21:47
 **/
@FeignClient(value = "eureka-client-ad-publish")
public interface AdPublishClient {

    /**
     * <h2>远程调用 获取推广计划 接口</h2>
     *
     * @param id [1]
     *
     * @return {@link CommonResponse}
     *
     * @throws AbstractAdSysBusinessException 异常
     * @author junG
     * @description 远程调用 获取推广计划 接口
     * @date 21:58 2019/6/2
     */
    @GetMapping("/ad-publish/plan/{id}")
    CommonResponse getAdPlan(@PathVariable("id") String id) throws AbstractAdSysBusinessException;

    /**
     * <h2>查找推广计划</h2>
     * @author junG
     * @description 查找推广计划
     * @date 21:22 2019/6/30
     * @param requestVO [1] 请求查询参数
     * @return {@link CommonResponse}
     * @throws AbstractAdSysBusinessException 异常
     */
    @GetMapping("/ad-publish/plan/find")
    CommonResponse findAdPlan(@RequestBody AdPlanRequestVO requestVO) throws AbstractAdSysBusinessException;
}
